<template>
  <div>
    <el-form label-width="80px" class="formcatorll">
      <el-form-item label="科目">
         <el-select placeholder="请选择科目" v-model="createPaper.subject">
          <el-option label="Html" value="Html"></el-option>
          <el-option label="Css" value="Css"></el-option>
          <el-option label="JavaScript" value="JavaScript"></el-option>
          <!--如果需要更多章节在此添加即可...-->
        </el-select>
      </el-form-item>
      <!--如要下拉选择科目而不是手动输入，从数据库获取所有科目后循环生成el-option-->
      <!-- <el-form-item label="科目">
					  <el-select  placeholder="请选择考试科目" v-model="createPaper.subject">
					    <el-option label="javascript基础" value="javascript基础"></el-option>
					    <el-option label="vue框架基础" value="vue框架基础"></el-option>
					  </el-select>
      </el-form-item>-->

      <!-- <el-form-item label="题目数">
        <el-input v-model.number="createPaper.quenumber" placeholder="请输入数字"></el-input>
      </el-form-item> -->
       <el-form-item label="第一章题数" label-width="85px">
        <el-input v-model.number="createPaper.first" placeholder="请输入数字"></el-input>
      </el-form-item>
       <el-form-item label="第二章题数" label-width="85px">
        <el-input v-model.number="createPaper.second" placeholder="请输入数字"></el-input>
      </el-form-item>
       <el-form-item label="第三章题数" label-width="85px">
        <el-input v-model.number="createPaper.third" placeholder="请输入数字"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="Generating_examPaper">生成试卷</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "",
  data() {
    return {
      createPaper: {
        subject: "", // 科目
        first: "",
        second:'',
        third:'' 
      }
    };
  },
  methods:{
    //   生成试卷
    Generating_examPaper(){
        this.axios('/api/examPaper',{params:this.createPaper})
    }
  }
};
</script>
<style  scoped>
/*form表单*/
.formcatorll {
  padding: 20px;
  max-width: 480px;
}
</style>